#ifndef __CM_BASE_PORT_H__
#define __CM_BASE_PORT_H__

#include "Poco/Net/SocketAddress.h"
#include "Poco/Net/SocketNotification.h"

#include "ByteBuffer.h"

using Poco::Net::SocketAddress;
using Poco::Net::ReadableNotification;

namespace cm_base
{
    class Port
    {
    public:
        Port();
        virtual ~Port();

        virtual int send(ByteBuffer* data,const SocketAddress& sa) = 0;

        //onReceive() listen SocketRactor read notification
        virtual void onReceive( ReadableNotification * sn) = 0;
    };
}

#endif